<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input @keyup.delete="hello" type="text" v-model="info">
        <input type="text">
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        var mv=new Vue({
            el:"#app",
            data:{
                info:'你不在餐桌上,那你在哪'
            },
            methods:{
                hello(){
                    console.log('你按了',event.keyCode)
                    this.info='';
                    // if(event.keyCode==8){
                    //     this.info='';
                    // }
                }
            }
        })
    </script>
</body>
</html>